package com.heima.recommend.config;

import com.heima.common.constants.KafkaMessageConstants;
import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.config.TopicBuilder;

@Configuration
public class KafkaConfig {

    @Bean
    public NewTopic topic1(){
        return TopicBuilder.name(KafkaMessageConstants.HOT_ARTICLE_SCORE_TOPIC).build();
    }

    @Bean
    public NewTopic topic2(){
        return TopicBuilder.name(KafkaMessageConstants.HOT_ARTICLE_INCR_HANDLE_TOPIC).build();
    }
}
